{{template "header.html" .}}

<div class="ui hidden divider"></div>

<div class="ui container">
    <div class="ui padded segment">

        <div class="ui huge green dividing header">Setup Admin Account</div>
        <div class="ui hidden divider"></div>

        {{with $error := .Request.FormValue "error"}}
            <div class="ui large negative message">
                <div class="content">
                    <div class="header">
                        {{if eq $error "invalid"}}
                            Invalid. Please try again.
                        {{else}}
                            Error. Please try again.
                        {{end}}
                    </div>
                </div>
            </div>
            <div class="ui hidden divider"></div>
        {{end}}

        <div class="ui huge info message">
            <div class="content">
                <div class="header">
                    Welcome to your new Subspace instance!
                </div>
                Please complete the setup of your admin account below.
            </div>
        </div>

        <div class="ui hidden divider"></div>

        <form class="ui huge form" action="/configure" method="POST" novalidate autocomplete="off">
            <div class="field">
                <div class="ui small header">Email Address</div>
                <input name="email" type="email" placeholder="Email Address" value="" autofocus>
            </div>
            <div class="field">
                <div class="ui small header">Confirm Email</div>
                <input name="email_confirm" type="email" placeholder="Confirm Email" value="">
            </div>
            <div class="field">
                <div class="ui small header">Create Password</div>
                <input name="password" type="password" placeholder="Password" value="">
            </div>
            <div class="equal width fields">
                <div class="field mobile hidden">&nbsp;</div>
                <div class="field mobile hidden">&nbsp;</div>
                <div class="field">
                    <button type="submit" class="ui huge fluid green button">Save</button>
                </div>
            </div>
        </form>

    </div>
</div>

{{template "footer.html" .}}
